/*******************************************************************************
SOCIAL TIES IN ACADEMIA: A FRIEND IS A TREASURE
by Tommaso Colussi
do file: Table 3
*******************************************************************************/
cd ${Dir}
do MASTER.do
set more off
*******************************************************************************/
*REGRESSIONS
use "${DirALL}TOREG.dta",clear

*number of connected articles
discard
cap estimates drop*
foreach x of varlist n_Tconn_pool n_Tconn_ever n_Tconn_advisor n_Tconn_phd n_Tconn_author n_key_jel_ref{
set more off
sum `x'
eststo: reghdfe `x' incharge,a(issue_fe namejournal_fe)  vce(cluster issue_fe)
}
esttab using Regressions_articles.csv, replace stats(N,  lab("Observations") fmt(%9.4f %9.0g)) cells(b( star fmt(4)) se( par fmt(4))) starlevels( * 0.10 ** 0.05 *** 0.01) nogap

*number of connected pages
discard
cap estimates drop*
foreach x of varlist page_Tconn_pool page_Tconn_ever  page_Tconn_advisor page_Tconn_phd page_Tconn_author page_key_jel_ref{
set more off
eststo: reghdfe `x' incharge,a(issue_fe namejournal_fe)  vce(cluster issue_fe)
}
esttab using Regressions_page.csv, replace stats(N,  lab("Observations") fmt(%9.4f %9.0g)) cells(b( star fmt(4)) se( par fmt(4))) starlevels( * 0.10 ** 0.05 *** 0.01) nogap

*number of conneced lead articles
discard
cap estimates drop*
foreach x of varlist lead_Tconn_pool lead_Tconn_ever   lead_Tconn_advisor lead_Tconn_phd  lead_Tconn_author lead_key_jel_ref {
eststo: reghdfe `x' incharge, a(issue_fe namejournal_fe) vce(cluster issue_fe)
}
esttab using Regressions_lead.csv, replace stats(N,  lab("Observations") fmt(%9.4f %9.0g)) cells(b( star fmt(4)) se( par fmt(4))) starlevels( * 0.10 ** 0.05 *** 0.01) nogap

